package io.work;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.nio.charset.StandardCharsets;

public class test4 {
    public static void main(String[] args) throws Exception {
        File file=new File("fos.txt");

        FileOutputStream fos=new FileOutputStream(file,true);
        String line ="茫茫人生，好像荒野";
        fos.write(line.getBytes(StandardCharsets.UTF_8));
        fos.write("难离难舍".getBytes(StandardCharsets.UTF_8));
        System.out.println("写出完毕");

        fos.close();
    }
}
